import request from './request.js'

// POST请求
export const $POST = (url, data) => {
    return request.post(url, data)
}

// GET请求
export const $GET = (url, data) => {
    return request.get(url, data)
}

// GET请求
export const $DELETE = (url, data) => {
    return request.delete(url, data)
}

// 微信sdk注入权限
export const weixinJssdk = data => request.get('/api/open/login/weixin-jssdk', data)

// 落地页详情接口
export const squeezePage = data => request.get('/api/mall/productSku/get?id='+ data)

// 查询购课
export const buyClass = data => request.get('/api/mall/client-app/owned-sku?PhoneNumber=' + data)

// 查询是否购买了课程---新
export const payHistory = data => request.get('/api/mall/users/pay-history?PhoneNumber=' + data.phone+'&skuId='+data.skuId)

// 授权--用code换openid
export const wxOauth = data => request.get('/api/open/login/weixin-oauth', data)

// 微信环境--支付订单接口 --h5订单接口
export const wxSubmitOrder = data => request.post('/api/mall/client-app/submit-order', data)

// 微信环境 --微信支付
export const wxSdkPay = data => request.post('/api/mall/wechat/payv3/pay/jsapipay', data)

// 外部浏览器微信支付
export const wxH5pay = data => request.post('/api/mall/wechat/payv3/pay/h5pay', data)

// 查询支付结果
export const pueryPay = data => request.get('/api/mall/pay-order/get-order-pay', data)

// 订单列表接口
export const orderList = data => request.get('/api/mall/product-order/getList', data)

// 课程列表接口
export const courseList = data => request.get('/api/courseware/ReportLearn/3a0025ae-6a2e-4c1c-fe3b-db5e8d2f7672', data)

// 课程详情接口
export const courseDetail = data => request.get('/api/courseware/ReportLearn/web', data)

// 获取个人信息接口
export const getUserFion = data => request.get('/api/account/my-profile', data)

// 短信验证码
export const noteVerify = data => request.post('/api/sms/aliyun/send-confirm-code', data)

// 绑定手机号
export const bindPhone = data => request.get('/api/courseware/account/bind-phone', data)

// 查询是否绑定号码
export const queryBindState = data => request.get('/api/courseware/account/bind-state', data)

// 绑定手机号 ----知道手机号绑定
export const BirectPhone = data => request.get('/api/courseware/account/direct-phone', data)

// 解除绑定手机号
export const removePhone = data => request.get('/api/courseware/account/remove-phone', data)